package com.chaodriod.uranus

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.chaodriod.amap.location.AMapLocationHelper

class MainActivity : AppCompatActivity() {

    private var aMapLocationHelper: AMapLocationHelper? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        aMapLocationHelper = AMapLocationHelper(this)
        aMapLocationHelper?.initLocation()
    }

    override fun onStart() {
        super.onStart()
        aMapLocationHelper?.startLocation()
    }

    override fun onStop() {
        super.onStop()
        aMapLocationHelper?.startLocation()
    }

    override fun onDestroy() {
        super.onDestroy()
        aMapLocationHelper?.destroyLocation()
    }
}
